<?php

require_once("../../controllers/init.php");
require_once($FILE_SYSTEM_ROOT."/controllers/authentication.php");

$personID = 0;
if (isset($_POST['personID']))
	$personID = $_POST['personID'];

$email = "";
if (isset($_POST['email']))
	$email = $_POST['email'];

$action = "";
if (isset($_POST['action']))
	$action = $_POST['action'];

switch ($action)
{
	case "add":
		$person = new Person($personID);
		$person->addEmail($email);
		break;

		
	case "remove":
		$person = new Person($personID);
		$person->removeEmail($email);
		break;
}

	
?>